package SV_PRIVILEGE_MISSING;

public class Vulnerable_01 {
    public void somemethod() {
        AccessController.doPrivileged(new PrivilegedAction<Void>() {
            public Void run() {
                // Privileged code goes here, for example:
                System.loadLibrary("awk");
                return null; // nothing to return
            }
        });
    }

    class MyAction implements PrivilegedAction<Void> {
        public Void run() {
            // Privileged code goes here, for example:
            System.loadLibrary("awt");
            return null; // nothing to return
        }
    }

    public void somemethod1() {

        MyAction mya = new MyAction();

        // Become privileged:
        AccessController.doPrivileged(mya);
    }
}
